

        <g:set var="entityName" value="${message(code: 'plan.label', default: 'Plan')}" />
            <g:form method="post" >
                <g:hiddenField name="id" value="${planInstance?.id}" />
                <g:hiddenField name="version" value="${planInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="classes"><g:message code="plan.classes.label" default="Classes" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: planInstance, field: 'classes', 'errors')}">
                                    <g:select name="classes.id" from="${Classes.list()}" optionKey="id" value="${planInstance?.classes?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="week"><g:message code="plan.week.label" default="Week" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: planInstance, field: 'week', 'errors')}">
                                    <g:textField name="week" value="${planInstance?.week}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="teacher"><g:message code="plan.teacher.label" default="Teacher" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: planInstance, field: 'teacher', 'errors')}">
                                    <g:select name="teacher.id" from="${Teacher.list()}" optionKey="id" value="${planInstance?.teacher?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="course"><g:message code="plan.course.label" default="Course" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: planInstance, field: 'course', 'errors')}">
                                    <g:textField name="course" value="${planInstance?.course}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="restTime"><g:message code="plan.restTime.label" default="Rest Time" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: planInstance, field: 'restTime', 'errors')}">
                                    <g:select name="restTime.id" from="${RestTime.list()}" optionKey="id" value="${planInstance?.restTime?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="school"><g:message code="plan.school.label" default="School" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: planInstance, field: 'school', 'errors')}">
                                    <g:select name="school.id" from="${School.list()}" optionKey="id" value="${planInstance?.school?.id}"  />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
